package com.yn.pet.controller.pc.response;

import com.yn.pet.bus.entity.DeviceInfo;
import com.yn.pet.entity.Pet;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

@Data
public class DeviceSearchResponse {

    @ApiModelProperty(value = "设备ID")
    private Long deviceId;

    @ApiModelProperty(value = "设备名称")
    private String deviceName;

    @ApiModelProperty(value = "IMEI")
    private String imei;

    @ApiModelProperty(value = "设备型号")
    private String deviceModel;



    public static DeviceSearchResponse transform(DeviceInfo info) {
        DeviceSearchResponse response = new DeviceSearchResponse();
        response.setDeviceId(info.getDeviceId());
        response.setDeviceName(info.getDeviceName());
        response.setImei(info.getImei());
        response.setDeviceModel(info.getDeviceModel());
        return response;
    }
}
